package com.sun.controller;

import com.sun.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 对象存储控制层
 */
@RestController
@RequestMapping("/oss")
public class OssController {

    @Autowired
    OssService ossService;

    @RequestMapping("/uploadFile")
    public String uploadFile(MultipartFile file){
        return ossService.uploadFile(file);
    }
}
